package ip;

import java.io.IOException;
import java.net.*;
import java.nio.charset.StandardCharsets;

public class udp_out {
    public static void main(String[] args) throws IOException {
        //bulids
        DatagramSocket ds = new DatagramSocket();
        //set
        byte[] byt ="hello udp".getBytes(StandardCharsets.UTF_8);
        int len = byt.length;
        InetAddress ss = InetAddress.getByName("192.168.0.103");
        int prot = 10086;
        DatagramPacket dp = new DatagramPacket(byt,len,ss,prot);

        //send
        ds.send(dp);
        //close
        ds.close();





}}
